package terminal_enum

// 终端-限速操作
type terminalLimitSpeed int

var TerminalLimitSpeed terminalLimitSpeed

// 解除限制
func (c *terminalLimitSpeed) SpeedLimitRemove() int {
	return 0
}

// 限制速度
func (c *terminalLimitSpeed) LimitSpeed() int {
	return 1
}

func (c *terminalLimitSpeed) ToText(value int) string {
	switch value {

	case 0:
		return "解除限制"

	case 1:
		return "限制速度"

	}
	return ""
}

func (c *terminalLimitSpeed) ToValue(text string) int {
	switch text {

	case "解除限制":
		return 0

	case "限制速度":
		return 1

	}
	return 0
}
